package com.novel.entiy.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @author tanghao
 * @date 2022/4/7
 */
@Data
public class NovelVO {
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "")
    private Long id;

    /**
     * 标题
     */
    @Size(min = 3, max = 30, message = "标题字数应在3-30之间")
    @ApiModelProperty(value = "标题")
    private String title;

    /**
     * 简介
     */
    @Size(min = 50, max = 1000, message = "简介字数应在50-1000之间")
    @ApiModelProperty(value = "简介")
    private String introduction;

    /**
     * 作者名称
     */
    @ApiModelProperty(value = "作者名称")
    private String authorName;

    /**
     * 作者id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "作者id")
    private Long authorId;

    /**
     * 阅读数
     */
    @ApiModelProperty(value = "阅读数")
    private Long browseNums;

    /**
     * 字数
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "字数")
    private Long wordNums;

    /**
     * 订阅数
     */
    @ApiModelProperty(value = "订阅数")
    private Long subscribeNums;

    /**
     * 热度
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "热度")
    private Long hotNums;

    /**
     * 0:连载中 1:已完结
     */
    @ApiModelProperty(value = "0:连载中 1:已完结 2:审核中 3:审核失败")
    private Integer status;

    /**
     * 第几章开始收费
     */
    @ApiModelProperty(value = "是否收费")
    private Integer isCharge;

    /**
     * 每章收费金额
     */
    @ApiModelProperty(value = "每章收费金额")
    private Long chargeAmount;

    /**
     * 打赏金额总数
     */
    @ApiModelProperty(value = "打赏金额总数")
    private Long rewardAmount;

    /**
     * 评论数
     */
    @ApiModelProperty(value = "评论数")
    private Long commentNums;

    /**
     * 封面
     */
    @ApiModelProperty(value = "封面")
    private String cover;

    /**
     * 评分
     */
    @ApiModelProperty(value = "评分")
    private BigDecimal score;

    /**
     * 你的评分
     */
    @ApiModelProperty(value = "你的评分")
    private BigDecimal scoreSelf;

    /**
     * 分类id
     */
    @ApiModelProperty(value = "分类id")
    private Integer classifyId;

    /**
     * 分类name
     */
    @ApiModelProperty(value = "分类名称")
    private Integer classifyName;

    @ApiModelProperty("最新三章信息")
    private List<ChapterVO> chapterList;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("最近阅读章节id")
    private Long recentChapterId;

    @ApiModelProperty("最近阅读章节名称")
    private String recentChapterName;

    @ApiModelProperty("是否加入书架")
    private Boolean existBookSelf;

    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("更新时间")
    private Date updatedTime;
}
